unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Label2: TLabel;
    Edit2: TEdit;
    Label3: TLabel;
    Edit3: TEdit;
    Label4: TLabel;
    Edit4: TEdit;
    Label5: TLabel;
    Edit5: TEdit;
    Label6: TLabel;
    Edit6: TEdit;
    Label7: TLabel;
    Edit7: TEdit;
    Label8: TLabel;
    Edit8: TEdit;
    Label9: TLabel;
    Edit9: TEdit;
    Label10: TLabel;
    Button1: TButton;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    Label16: TLabel;
    Label17: TLabel;
    Label18: TLabel;
    Label19: TLabel;
    keys: TListBox;
    Button2: TButton;
    ListBox1: TListBox;
    vyhod: TEdit;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  end;

var
  Form1: TForm1;
  t:tstringlist;
  texts:tstringlist;

implementation

{$R *.dfm}

function _coding(key:integer; values:TStringList):PChar;External 'Core.dll';
procedure _decoding(code:string;texts:TListbox);External 'Core.dll';


procedure TForm1.FormCreate(Sender: TObject);
begin
t:=tstringlist.Create;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
t.Free;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
t.Add(edit1.Text);
t.Add(edit2.Text);
t.Add(edit3.Text);
vyhod.Text:=_coding(7,t);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
_decoding(vyhod.Text,listbox1);
end;

end.
